﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLCHBANGIAY.DATA
{
   public class Brand
    {

        #region[Declare variables]
        private string _Id;
        private string _Name;
        private string _Logo;
        private string _Ord;
        private string _Lang;
        #endregion
        #region[Public Properties]
        public string Id { get { return _Id; } set { _Id = value; } }
        public string Name { get { return _Name; } set { _Name = value; } }
        public string Logo { get { return _Logo; } set { _Logo = value; } }
        public string Ord { get { return _Ord; } set { _Ord = value; } }
        public string Lang { get { return _Lang; } set { _Lang = value; } }
        #endregion
        #region[Brands IDataReader]
        public Brand BrandsIDataReader(IDataReader dr)
        {
            Brand obj = new Brand();
            obj.Id = (dr["Id"] is DBNull) ? string.Empty : dr["Id"].ToString();
            obj.Name = (dr["Name"] is DBNull) ? string.Empty : dr["Name"].ToString();
            obj.Logo = (dr["Logo"] is DBNull) ? string.Empty : dr["Logo"].ToString();
            obj.Ord = (dr["Ord"] is DBNull) ? string.Empty : dr["Ord"].ToString();
            obj.Lang = (dr["Lang"] is DBNull) ? string.Empty : dr["Lang"].ToString();
            return obj;
        }
        #endregion
    }
}
